﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Reflection;
using System.Collections; 
using System.Web.UI;
using Liger.Web.Common;

namespace Liger.Web.Common.Extensions
{
    /// <summary>
    /// 扩展方法
    /// </summary>
    public static class ObjectExtension
    { 
        public static int ToInt(this object obj)
        {
            return ConvertHelper.ObjToInt(obj);
        }

        public static string ToStr(this object obj)
        {
            return ConvertHelper.ObjToStr(obj);
        }

        public static decimal ToDecimal(this object obj)
        {
            return ConvertHelper.ObjToDecimal(obj);
        }


        public static int? ToIntNull(this object obj)
        {
            return ConvertHelper.ObjToIntNull(obj);
        }

        public static decimal? ToDecimalNull(this object obj)
        {
            return ConvertHelper.ObjToDecimalNull(obj);
        }

        public static bool ToBool(this object obj)
        {
            return ConvertHelper.ObjToBool(obj);
        }
          
        public static DateTime? ToDateNull(this object obj)
        {
            return ConvertHelper.ObjToDateNull(obj);
        }
         
         

    }
}
